User Function TM500ORI()

Local cCdrOri := ''

	cCdrOri := Posicione( "DT6", 1, xFilial("DT6") + M->DT6_FILDOC + M->DT6_DOC + M->DT6_SERIE, "DT6_CDRDES") //DT6_FILIAL+DT6_FILDOC+DT6_DOC+DT6_SERIE

Return cCdrOri